
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>wStatistics</title>
<link href="./Wopop_files/style_log.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/style.css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/userpanel.css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/jquery.ui.all.css">
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="./bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="./jquery/jquery-1.8.3.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="./bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="./bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="./bootstrap/js/locales/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script>
<script type="text/javascript">
  $(function() {
    //
    $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii',minuteStep:10});
  })
   function test(){

            var form = new FormData(document.getElementById("tf"));
            var table = form.table;
            var myDate = new Date();
            var now = myDate.toLocaleString( );
            if(subform.robot.value==null||subform.robot.value==""){
                alert("机器人名称不能为空！！！");
                return false;
            }
            console.log(subform.s_time.value);
            console.log(subform.e_time.value);
           if(subform.s_time.value>=subform.e_time.value||subform.e_time.value>=now){
               alert("时间区间错误，请重新填写！！！");
               return false;
           }
            $.ajax({
                url:"./init.php",
                type:"post",
                data:$("#tf").serialize(),
                success:function(data){
                  // console.log(subform.table.value);
                  if(subform.table.value==1){
                     location.href='share.php';
                  }else if(subform.table.value==2){
                     location.href='groupData.php';
                  }else if(subform.table.value==3){
                     location.href='display.php';
                  }

                    console.log("over..");
                },
                error:function(e){
                    alert("错误！！");
                }
            });        
        }
  </script>  
</head>

<body class="login" mycollectionplug="bind">
<form id=tf name="subform">
<div class="login_m">
<div class="login_logo"><img src="./Wopop_files/logo.png" width="196" height="46"></div>
<div class="login_boder">

<div class="login_padding" id="login_model">
<div>
  <span class="s_an" >机器人名</span>
  <label style="display: block;padding: 0 0 0 60px;">
  <input type="text" id="robot1" class="txt_input txt_input2" placeholder="机器人名称，以“,”分隔" value="" name="robot">
  </label>
</div>
  
<!--<div>-->
  <!--<span class="s_an" >机器人2</span>-->
  <!--<label style="display: block;padding: 0 0 0 60px;">-->
  <!--<input type="text" id="robot2" class="txt_input txt_input2" placeholder="robot name" value="" name="robot2">-->
  <!--</label>-->
<!--</div>-->
<div>
  <span style="float: left;padding: 5px 0; font-family: monospace;font-size: 14px;" >开始时间</span>
  <label style="display: block;padding: 0 0 0 60px;">
  <input size="16" type="text" value="2017-04-10 21:00" readonly class="form_datetime" name="s_time">
  </label>
  <span style="float: left;padding: 5px 0; font-family: monospace;font-size: 14px;" >结束时间</span>
<label style="display: block;padding: 0 0 0 60px;">
  <input size="16" type="text" value="2017-04-10 21:00" readonly class="form_datetime" name="e_time"> 
  </label>  
</div>
<div >
  <span class="s_an" >统计类型</span>
  <label style="display: block;padding: 10px 0 0 69px;margin: 0px;font-size: 14px;">
  <input type="radio" style="padding: "  id="minute" checked="checked" name="time" value="10" />
      <label for="minute"style="display: inline;padding: 10px 5px; font-family: monospace;">10分钟</label>
  <input type="radio" id="hour" name="time" value="1" />
  <label for="hour"style="display: inline;padding: 10px 5px; font-family: monospace;">1小时</label>
  </label>
</div>
<div>
  <span style="float: left;padding: 5px 0; font-family: monospace;font-size: 14px;">报表类型</span>
  <label style="display: block;padding: 0 0 0 50px;margin: 20px;font-size: 14px;">
  <input type="radio"  id="image" checked="checked" name="table" value="1" />
  <label for="image" style="display: inline;padding: 10px 5px; font-family: monospace;">图片分享率</label> 
  <br/>
  <input type="radio" id="group" name="table" value="2" />
  <label for="group"style="display: inline;padding: 10px 5px; font-family: monospace;">个群增长趋势</label> 
  <br/>
  <input type="radio" id="display" name="table" value="3" />  
  <label for="display" style="display: inline;padding: 10px 5px; font-family: monospace;">活动增长对比趋势</label>
  <br/>
  </label>
</div>
 
  <div style="margin-top:50px; margin-right:-5px" class="rem_sub" >
    <label>
      <input type="button" class="sub_button" name="button" id="button" value="确定" style="opacity: 0.7;" onclick="test()">
    </label>
<label>
      <input type="reset" class="sub_button" name="button"  value="重置" style="opacity: 0.7;">
    </label>
</div>
 
</form>
<!--login_padding  Sign up end-->
</div><!--login_boder end-->
</div><!--login_m end-->
 <br> <br>


</body></html>